package com.cilico.single.shopcart;

/**
 * 储存购物车订单
 * 
 * @author lvxiangan
 * 
 */
public class ShopCartInfo {
	private String restaurantId_ = ""; // 餐厅id
	private String productId_ = ""; // 产品id
	private String productName_ = ""; // 产品名称
	private String productPrice_ = ""; // 产品价格
	private String productAmount_ = ""; // 产品数量
	/**菜品特价*/
	private String special_ = "";


	public ShopCartInfo (String restaurantId, String productId, String productName, String productPrice, String productAmount) {
		restaurantId_ = restaurantId;
		productId_ = productId;
		productName_ = productName;
		productPrice_ = productPrice;
		productAmount_ = productAmount;
	}
 	public String getRestaurantId() {
		return restaurantId_;
	}

	public void setRestaurantId(String restaurantId) {
		this.restaurantId_ = restaurantId;
	}

	public String getProductId() {
		return productId_;
	}

	public void setProductId(String productId) {
		this.productId_ = productId;
	}

	public String getProductName() {
		return productName_;
	}

	public void setProductName(String productName) {
		this.productName_ = productName;
	}

	public String getProductPrice() {
		return productPrice_;
	}

	public void setProductPrice(String productPrice) {
		this.productPrice_ = productPrice;
	}

	public String getProductAmount() {
		return productAmount_;
	}

	public void setProductAmount(String productAmount) {
		this.productAmount_ = productAmount;
	}


	public String toString() {
		StringBuffer buf = new StringBuffer();
		if (null == restaurantId_) {
			restaurantId_ = "";
		}
		if (null == productId_) {
			productId_ = "";
		}
		if (null == productName_) {
			productName_ = "";
		}
		if (null == productPrice_) {
			productPrice_ = "";
		}
		if (null == productAmount_) {
			productAmount_ = "";
		}
		if (null == special_) {
			special_ = "";
		}
		buf.append("restaurantId=").append(restaurantId_).append("&");
		buf.append("productId=").append(productId_).append("&");
		buf.append("productName=").append(productName_).append("&");
		buf.append("productPrice=").append(productPrice_).append("&");
		buf.append("productAmount=").append(productAmount_).append("&");
		buf.append("special=").append(special_).append("&");
		// delete the last '&'.
		if (buf.length() > 0 && buf.charAt(buf.length() - 1) == '&') {
			buf.deleteCharAt(buf.length() - 1);
		}
		return buf.toString();
	}
	public String getSpecial_() {
		if (special_ == null || special_.equals("")) {
			special_ = "-1";
		}
		return special_;
	}
	public void setSpecial_(String special_) {
		this.special_ = special_;
	}
}